<template>
  <div>
    <ZgEdit
      ref="dialog"
      :columns="columns"
      :formulas="formulas"
      :inputClick="inputClick"
      validUrl=""
      saveUrl=""
      :view="view"
      @ok="$emit('ok')">
    </ZgEdit>
  </div>
</template>
<script>
export default {
  data () {
    return {
      view: {
        width: '50%',
        top: '3%',
        title: '还款单上传'
      },
      columns: [
        { name: '产品', code: 'product', compType: '单行文本', isNeed: false, offset: 0, span: 12, defaultVal: '焦煤数字金融2.0平安银行重庆' },
        { name: '融资企业', code: 'company', compType: '单行文本', isNeed: false, offset: 0, span: 12, defaultVal: '重庆钢铁股份有限公司' },
        { name: '放款方账号', code: 'account1', compType: '单行文本', isNeed: false, offset: 0, span: 12, defaultVal: '621700000000' },
        { name: '还款方账号', code: 'account2', compType: '单行文本', isNeed: false, offset: 0, span: 12, defaultVal: '621700000320' },
        { name: '放款日期', code: 'startDate', compType: '日期', isNeed: false, offset: 0, span: 12, defaultVal: '' },
        { name: '约定还款日', code: 'endDate', compType: '日期', isNeed: false, offset: 0, span: 12, defaultVal: '' },
        { name: '放款金额', code: 'score1', compType: '浮点数', isNeed: false, offset: 0, span: 12, defaultVal: 0, unit: '元' },
        { name: '还款金额', code: 'score2', compType: '浮点数', isNeed: false, offset: 0, span: 12, defaultVal: 0, unit: '元' },
        { name: '放款凭证上传', code: 'upload', compType: '多图', isNeed: false, offset: 0, span: 12, defaultVal: '', extra: { note: '' } }
      ],
      formulas: []
    }
  },
  methods: {
    open () {
        this.$refs.dialog.open()
    },
    inputClick (t) {
      alert(JSON.stringify(t))
    }
  }
}
</script>

<style lang="scss" scoped>
</style>
